package com.hpu.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hpu.pojo.TbItem;
import com.hpu.service.ItemSerivce;

@RestController
@RequestMapping("/item")
public class ItemController {
	
	@Autowired
	private ItemSerivce itemSerivce;
	
	
	@RequestMapping("/findById/{id}")
	private TbItem getItemById(@PathVariable Long id) {
		
		TbItem tbItem = itemSerivce.findTbItemById(id);
		return tbItem;
	}

}
